package ch.ti.bfh.app.loodel.service.create;

import com.mysema.query.annotations.QueryProjection;

import java.io.Serializable;

public class ShowTimeSlotLocationData implements Serializable {

    private String name;

    private String street;

    private String place;

    @QueryProjection
    public ShowTimeSlotLocationData(String place, String street, String name) {
        this.place = place;
        this.street = street;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof ShowTimeSlotLocationData)) return false;

        ShowTimeSlotLocationData that = (ShowTimeSlotLocationData) o;

        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (place != null ? !place.equals(that.place) : that.place != null) return false;
        if (street != null ? !street.equals(that.street) : that.street != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + (street != null ? street.hashCode() : 0);
        result = 31 * result + (place != null ? place.hashCode() : 0);
        return result;
    }
}
